//package com.easylinkin.linkappapi.yysh.service.impl;
//
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.easylinkin.linkappapi.yysh.entity.DataAnalystBean;
//import com.easylinkin.linkappapi.yysh.entity.QueryDataCondition;
//import com.easylinkin.linkappapi.yysh.mapper.DataAnalystMapper;
//import com.easylinkin.linkappapi.yysh.service.DataAnalystService;
//import org.springframework.stereotype.Service;
//import org.springframework.util.Assert;
//
//import java.util.*;
//
//@Service
//public class DataAnalystServiceImpl extends ServiceImpl<DataAnalystMapper, DataAnalystBean> implements DataAnalystService {
//
//    @Override
//    public Page<DataAnalystBean> selectDataAnalystPage(Page page, QueryDataCondition queryDataCondition) {
//        Assert.notNull(page, "分页数据不能为空");
//        List<DataAnalystBean> dataAnalystBeanPage = baseMapper.selectDataAnalystPage(page, queryDataCondition);
//        page.setRecords(dataAnalystBeanPage);
//        return page;
//    }
//
//    @Override
//    public Boolean insertDataAnalystRecord(DataAnalystBean dataAnalystBean) {
//        Assert.notNull(dataAnalystBean.getLocation(), "位置参数不能为空");
//        Assert.notNull(dataAnalystBean.getFeedstockTime(), "进料时间不能为空");
//        Assert.notNull(dataAnalystBean.getPressTime(), "压榨时间不能为空");
//        dataAnalystBean.setCreateTime(new Date());
//        dataAnalystBean.setUpdateTime(new Date());
//        dataAnalystBean.setStatus(1);
//        dataAnalystBean.setId(UUID.randomUUID().toString().replaceAll("-", ""));
//        baseMapper.insertDataAnalystRecord(dataAnalystBean);
//        return true;
//    }
//
//    @Override
//    public Boolean deleteDataAnalystRecord(String id) {
//        /*List<String> dataAnalystIds = null;
//        if(ids.contains(",")){
//            String[] split = ids.split(",");
//            dataAnalystIds = Arrays.asList(split);
//        }else {
//            dataAnalystIds = new ArrayList<String>();
//            dataAnalystIds.add(ids);
//        }*/
//        baseMapper.deleteDataAnalystRecord(id);
//        return true;
//    }
//
//    @Override
//    public Boolean updateDataAnalystRecord(DataAnalystBean dataAnalystBean) {
//        Assert.notNull(dataAnalystBean.getId(), "主键ID不能为空");
//        Assert.notNull(dataAnalystBean.getLocation(), "位置参数不能为空");
//        Assert.notNull(dataAnalystBean.getFeedstockTime(), "进料时间不能为空");
//        Assert.notNull(dataAnalystBean.getPressTime(), "压榨时间不能为空");
//        dataAnalystBean.setUpdateTime(new Date());
//        baseMapper.updateDataAnalystRecord(dataAnalystBean);
//        return true;
//    }
//
//    @Override
//    public DataAnalystBean getDataAnalystInfoByCondition(DataAnalystBean dataAnalystBean) {
//        return null;
//    }
//}
